package com.tbm.common.enums;

import com.tbm.entity.JsonEntity;
import com.tbm.entity.MenuEntity;
import com.tbm.entity.RoleEntity;
import com.tbm.entity.SystemUser;
import com.tbm.repository.JsonEntityRepository;
import com.tbm.repository.MenuEntityRepository;
import com.tbm.repository.RoleEntityRepository;
import com.tbm.repository.SystemUserRepository;

/**
 * Created by Administrator on 2017/9/18.
 */
public enum  RestfulEntity {

    JSONENTITY("JsonEntity", JsonEntity.class,"jsonId","setJsonName", JsonEntityRepository.class),
    MENUENTITY("MenuEntity",MenuEntity.class,"menuId","setMenuName", MenuEntityRepository.class),
    ROLEENTITY("RoleEntity", RoleEntity.class,"roleId","setRoleName", RoleEntityRepository.class),
    SYSTEMUSER("SystemUser", SystemUser.class,"userId","setUserName", SystemUserRepository.class),


    ;
    private String entity;
    private Class clazz;
    private String sortId;
    private String keyName;
    private Class repositoryClazz;

    RestfulEntity(String entity, Class clazz, String sortId,String keyName,Class repositoryClazz) {
        this.entity = entity;
        this.clazz = clazz;
        this.sortId = sortId;
        this.keyName = keyName;
        this.repositoryClazz = repositoryClazz;
    }

    public String getEntity() {
        return entity;
    }

    public void setEntity(String entity) {
        this.entity = entity;
    }

    public Class getClazz() {
        return clazz;
    }

    public void setClazz(Class clazz) {
        this.clazz = clazz;
    }

    public String getSortId() {
        return sortId;
    }

    public void setSortId(String sortId) {
        this.sortId = sortId;
    }

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    public Class getRepositoryClazz() {
        return repositoryClazz;
    }

    public void setRepositoryClazz(Class repositoryClazz) {
        this.repositoryClazz = repositoryClazz;
    }
}

